#include "stdafx.h"

#define LINES 30
struct sf_cons
{
	
    float x, line1_pos, mult, y[LINES];
    sf::Text lines[LINES];
    Font font;
    int next_line;
    sf_cons()
    {
        font.loadFromFile("ProFontWindows.ttf");
        x = 5;
        mult = 12;
        line1_pos = 30;
        next_line = 0;
        FOR(LINES)
        {
            lines[i].setFont(font);
            lines[i].setCharacterSize(mult);
            lines[i].setString("---");
            y[i] = float((mult - 2)*i) + line1_pos;
            lines[LINES-1-i].setPosition(x,y[i]);
        }
    }
    void push_text(string s)
    {
        lines[next_line].setString(s);
        next_line++;
        next_line %= LINES;
        FOR(LINES)
            lines[LINES-1-i].setPosition(x,y[LINES-1-((i+next_line)%LINES)]);
    }
};